<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"  xmlns:th="http://www.thymeleaf.org/">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>个人中心</title>
  <meta name="keywords" content="">
  <meta name="description" content="">

  <div th:include="includeJs::includeJs"></div>
  <div th:include="includeJs::layui_js"></div>

  <link rel="stylesheet" th:href="@{/css/account/lay-cz.css}">
  <link rel="stylesheet" th:href="@{/css/userInfo/common.css}">
  <link rel="stylesheet" th:href="@{/css/userInfo/user.css}">
  <link rel="stylesheet" th:href="@{/css/userInfo/fileupload.less.css}">

  <script type="text/javascript" th:src="@{/js/jquery.min.js}"></script>
  <script type="text/javascript" th:src="@{/js/userInfo/common.js}"></script>
  <script type="text/javascript" th:src="@{/js/userInfo/user.js}"></script>

  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.11/vue.min.js"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.19.2/axios.min.js"></script>
  <style type="text/css">
    .ui-fileupload-choose{
      background:none;
      width: 90px; height: 90px;
      border:0px none;
    }
    .ui-fileupload-choose input{
      width:100%;height:100%;
    }
    .ui-icon{
      background:none;
      width:0px;height:0px;
    }
    ol{list-style-type:none;counter-reset:sectioncounter;}
    ol li:before {
      content:counter(sectioncounter) "、";
      counter-increment:sectioncounter;
    }
    .pmain-money li {
      float: left;
      width: 130px;
      padding: 0px 28px;
      height: 55px;
      margin: 25px 0;
      border-left: 1px solid #F2F2F2;
    }
    .layui-layer-content{
      padding: 30px;
    }

    .aq1{ display:inline-block; width:90px; height:8px; background-color:#f1483c; border-radius:2px;}
    .aq2{ display:inline-block; width:90px; height:8px; background-color:RGB(255,255,102); border-radius:2px;}
    .aq3{ display:inline-block; width:90px; height:8px; background-color:RGB(0,176,80); border-radius:2px;}
  </style>
</head>
<body>
<!--最上面-->
<link th:replace="includeJs::dingding_header">
<!--第二上面-->
<div style="background-color: white;width: 100%">
  <link th:replace="includeJs::dingding_nav">
</div>
<div id="addAdvert" class="layui-form" style="display:none;z-index: 999">
  <div class="layui-row layui-col-space8" id="dataTable" style="float: left;padding-top: 10px;width: 400px;">

  </div>
  <div class="col-md-6 grid-margin stretch-card" style="float: left;margin-top: 10px;width: 390px;">
    <h4 style="
    font-size: 24px;
    margin-bottom: 10px;
">叮叮签到</h4>
    <ol class="list-arrow" style="
    color: #666;
    font-size: 13px;
">
      <li style="margin-top: 5px;"><font color="#6d6d6d">灰色表示未签到</font>、<font color="#0ac893">绿色表示已签到</font>、<font color="#FFB800">黄色表示未来的签到</font>、<font color="#C82938">红色表示还未签到</font></li>
      <li style="
    margin-top: 5px;
">补签所需10积分才可补签</li>
      <li style="
    margin-top: 5px;
">连续7天、15天、25天、满月可获得不同奖励</li>
      <li style="
    margin-top: 5px;
">签到一天可获得10积分</li>
    </ol>
  </div>
</div>
<!--个人中心-->
<div class="wrapper wbgcolor">
  <div class="w1200 personal">
    <link th:replace="includeJs::userInfoMenu">
    <div class="personal-main">
      <div class="pmain-profile">
        <div class="pmain-welcome">
          <span class="fl">
            <span id="outLogin">晚上好，</span>
            <span th:text="${user.getNickName()}"></span>
          </span>
          <input type="hidden" id="uid" th:value="${user.getId()}">
          <span class="fr">
            <button type="button" id="sign_in" class="layui-btn layui-btn-warm layui-btn-sm" >叮叮签到</button>
            <button id="sel_sign" class="layui-btn layui-btn-normal layui-btn-sm">【查看签到次数】</button>
            <button id="exchange" class="layui-btn layui-btn-normal layui-btn-sm" style="background-color: #095e9b;">【兑换商品】</button>
            <button type="button" id="integtal" class="layui-btn layui-btn-sm" title="积分记录"><i class="layui-icon layui-icon-log" style="color: inherit;"></i></button>
          </span>
        </div>
        <div class="pmain-user">
          <div class="user-head">
            <span id="clickHeadImage" class="head-img" title="点击更换头像">
            <form method="post" action="">
              <input type="hidden" name="userPhotoUploadForm" value="userPhotoUploadForm">
              <span id="userPhotoUploadForm:photo">
                <img  id="userPhotoUploadForm:photoImage" class="faceImg" th:src="${user.getFace()}" alt="" style="width:88px;height:88px;z-index:0;">
                <!--上传头像-->
                <i id="tx" class="headframe" style="z-index:0;"></i>-

              <div id="userPhotoUploadForm:shangchuan-btn" class="ui-fileupload ui-widget" style="z-index:0;">
                <div class="ui-fileupload-buttonbar ui-corner-top">
                  <span class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-left ui-fileupload-choose" role="button">
                    <span class="ui-button-icon-left ui-icon ui-c ui-icon-plusthick"></span>
                    <span class="ui-button-text ui-c"></span>
                    <input type="file" id="userPhotoUploadForm:shangchuan-btn_input" name="userPhotoUploadForm:shangchuan-btn_input" style="z-index:0;">
                  </span>
                </div>
                <div class="ui-fileupload-content ui-widget-content ui-corner-bottom">
                  <table class="ui-fileupload-files">
                    <tbody>
                    </tbody>
                  </table>
                </div>
              </div>
              </span>
              <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="2696547217205030168:-301641994240890871" autocomplete="off">
            </form>
            </span>
            <span class="head-icon">
              <input type="hidden" id="cardId" th:value="${userInfo.getIdCard()}">
              <input type="hidden" id="getEmail" th:value="${user.getEmail()}">
              <input type="hidden" id="phone" th:value="${user.getPhone()}">
              <i id="headicon01" class="headiconbg headicon01"></i>
              <i id="headicon02" class="headiconbg headicon02"></i>
              <i id="headicon03" class="headiconbg headicon03"></i>
            </span>
          </div>
          <div class="user-info user-info1">
            <ul>
              <li>用户名
                <span th:text="${user.nickName}">
                </span>
                <span style="color: #0a98af;" th:text="${'剩余积分:'+user.residuePoint}">
                </span>
              </li>
              <input type="hidden" id="name" th:value="${userInfo.getRealName()}">
              <input type="hidden" id="idCard" th:value="${userInfo.getIdCard()}">
              <input type="hidden" id="pwd" th:value="${userInfo.getPayPwd()}">
              <input type="hidden" id="email"  th:value="${user.getEmail()}">
              <li>安全级别
              <span>
                <i class="safe-level" id="aqdj">
                  <i class="onlevel" style="width:40%;"></i>
                </i>
                </span>
                <span id="aq"></span>
              </li>
              <li>信用分:<span style="color: #0a98af;" th:text="${user.credit}"></span></li>
            </ul>
          </div>
        </div>
        <div class="pmain-money">
          <ul style="margin-left: 0px;width: 940px">
            <li class="none" style="width: 178px">
              <span><em>账户总额</em>
                <i id="zhze" class="markicon"></i>
                <span class="arrow-show1" style="display:none;">
                  可用余额</span>
                <span class="icon-show1" style="display:none;"></span>
              </span>
              <span class="truemoney">
                <i class="f26 fb"  th:text="${userInfoMoney}">
                 0.00  </i> 元
             </span>
            </li>
            <li style="width: 178px">
              <span>
                <em>待收本息</em>
                <i id="dsbx" class="markicon"></i>
                <span class="arrow-show2" style="display:none;">
                  未到账的投资项目的本金、利息总额
                </span>
                <span class="icon-show2" style="display:none;"></span>
              </span>
              <span class="truemoney">
                 <i class="f26 fb" th:if="${interest} == null" >0.00</i>
                <i class="f26 fb" th:text="${interest}" >0.00</i> 元
              </span>
            </li>
            <li style="width: 178px">
              <span>
                <em>累计收益</em>
                <i id="ljsy" class="markicon"></i>
                <span class="arrow-show3" style="display: none;">已到账的投资收益+未到账的投资收益</span>
                <span class="icon-show3" style="display: none;"></span>
              </span>
              <span class="truemoney">
                <i class="f26 fb c-pink" th:if="${profit} == null">0.00 </i>
                <i class="f26 fb c-pink" th:text="${profit}">0.00 </i> 元
              </span>
            </li>
            <li style="width: 178px">
              <span>
                <em>待还借款</em>
                <i id="ljjk" class="markicon"></i>
                <span class="arrow-show4" style="display: none;">所有借款-已还借款</span>
                <span class="icon-show4" style="display: none;"></span>
              </span> <span class="truemoney">
              <i th:text="${loanmoney}" class="f26 fb c-pink">0.00 </i> 元</span>
            </li>
          </ul>
        </div>
      </div>
      <script type="text/javascript">
        layui.use(['upload','layer'],function () {
          var layer = layui.layer;
          var upload = layui.upload;
          /*$("#userPhotoUploadForm:shangchuan-btn_input").click(function () {

          })*/

          upload.render({
            elem: '#tx' //绑定元素
            ,url: "/uploadFace"
            ,images:"images"
            ,before: function(obj){
              //预读本地文件示例，不支持ie8
              obj.preview(function(index, file, result){
              });
            }
            ,done: function(res){
              //如果上传失败
              if(res.code > 0){
                return layer.msg('上传失败');
              }
              //上传成功
              console.log(res.url);
              $(".faceImg").attr("src",res.url);
            }
          });

        })
        //<![CDATA[
        $(function(){
          /*$("#clickHeadImage").click(function(){
            $(this).find('span').removeClass('ui-state-hover');
            document.getElementById("userPhotoUploadForm:shangchuan-btn_input").click();
          });*/

          var safeLevel = "低";
          if(safeLevel=="高"){
            $(".pmain-user .user-info li .safe-level .onlevel").css("background-color","#f1483c");
          }

          $("#clickHeadImage span").hover(function(){
            $(this).removeClass('ui-state-hover');
          });

          var myDate = new Date();
          var h = myDate.getHours();
          if(h>11 && h<19){
            $("#outLogin").html("花店不开了，花继续开 ,下午好");
          }else if(h>18){
            $("#outLogin").html("总之岁月漫长，然而值得等待 ,晚上好");
          }else{
            $("#outLogin").html("爱自己是终身浪漫的开始,上午好");
          }
        });
        //]]>
      </script>
      <div class="pmain-connent">
        <div id="pmain-contab" class="pmain-contab">
          <ul>
            <li id="pmain-contab1" class="on">回款计划</li>
            <li id="pmain-contab2">资金记录</li>
            <li id="pmain-contab3">投资记录</li>
            <li class="li-other"></li>
          </ul>
        </div>
        <div class="pmain-conmain" id="pmain-conmain">
          <div id="planApp" class="pmain-conmain1">
            <table class="layui-table" lay-skin="line">
              <thead>
              <tr>
                <th>回款时间</th>
                <th>投资项目</th>
                <th>交易金额(元)</th>
                <th>待收利息</th>
                <th>期限</th>
                <th>状态</th>
              </tr>
              </thead>
              <tbody>
              <tr v-for="p in plan"  >
                <td v-text="p.recovery_time"></td>
                <td v-text="p.mark_name"></td>
                <td v-text="p.money"></td>
                <td v-text="p.estimate_money"></td>
                <td v-text="p.types"></td>
                <td v-text="p.state"></td>
              </tr>
              </tbody>

            </table>
            <!--分页  居中显示-->
            <center>
              <div id="demo3"></div>
            </center>
            <div class="pmain-morebtn" style="border-top:0;margin-top:0"></div>
          </div>
          <!--资金记录-->
          <div id="fundApp" class="pmain-conmain2" style=" display:none;">

            <table class="layui-table" lay-skin="line">
              <thead>
              <tr>
                <th>交易时间</th>
                <th>交易类型</th>
                <th>交易金额(元)</th>
                <th>备注</th>
              </tr>
              </thead>
              <tbody>
              <tr v-for="f in funds" :key="f.fund_id" >
                <td v-text="f.fund_date"></td>
                <td v-text="f.fund_post"></td>
                <td v-text="f.fund_amunt"></td>
                <td v-text="f.fund_remark"></td>
              </tr>
              </tbody>
            </table>
            <!--分页  居中显示-->
            <center>
              <div id="demo0"></div>
            </center>
            <div class="pmain-morebtn" style="border-top:0;margin-top:0"></div>
          </div>
          <!--投资记录-->
          <div id="app" class="pmain-conmain3" style=" display:none;">
            <table class="layui-table" lay-skin="line">
              <thead>
              <tr>
                <th>交易时间</th>
                <th>投资项目</th>
                <th>交易金额(元)</th>
                <th>状态</th>
                <th>我的收益</th>
              </tr>
              </thead>
              <tbody>
              <tr v-for="b in bids" :key="b.bid_id" >
                <td v-text="b.Investment_time"></td>
                <td v-text="b.mark_name"></td>
                <td v-text="b.money"></td>
                <td v-text="b.state"></td>
                <td v-text="b.estimate_money"></td>
              </tr>
              </tbody>
            </table>

            <!--分页  居中显示-->
            <center>
              <div id="demo1"></div>
            </center>

            <div class="pmain-morebtn" style="border-top:0;margin-top:0"></div>
          </div>
        </div>
      </div>
    </div>
    <div class="clear"></div>
  </div>
</div>
<link th:replace="includeJs::userInfoJS">
</body>
<script>
  let $page = [[${page}]];
  let $page2 = [[${page2}]];
  let $page3 = [[${page3}]];
  let $uid = $("#uid").val();
  let $RECHARGE =[[${T(com.ddf.publics.tool.MoneyFund).FUND_RECHARGE}]];
  let $FUND_INVEST =[[${T(com.ddf.publics.tool.MoneyFund).FUND_INVEST}]];
  let $FUND_DEPOSIT =[[${T(com.ddf.publics.tool.MoneyFund).FUND_DEPOSIT}]];
  let $FUND_REPAYMENT =[[${T(com.ddf.publics.tool.MoneyFund).FUND_REPAYMENT}]];
  let $FUND_PAYMENT =[[${T(com.ddf.publics.tool.MoneyFund).FUND_PAYMENT}]];
  let $FUND_BORROW_MONEY =[[${T(com.ddf.publics.tool.MoneyFund).FUND_BORROW_MONEY}]];

  //资金记录
  let vue1 = new Vue({
    el:"#fundApp",
    data:{
      funds:null
    },
    methods:{
    }
  })

  //投资记录
  let vue2 = new Vue({
    el: "#app",
    data: {
      bids:null
    },
    methods:{
    }
  });

  //回款计划
  let vue3 = new Vue({
    el:"#planApp",
    data:{
      plan:null
    },
    methods:{

    }
  })
  let getEmail= $("#getEmail").val();
  let cardId= $("#cardId").val();
  let phone= $("#phone").val();
  if(getEmail != null && getEmail !=''){
    $("#headicon03").css("background-position","-50px -190px")
  }
  if(cardId != null && cardId !=''){
    $("#headicon01").css("background-position","0px -190px")
  }
  if(phone != null && phone !=''){
    $("#headicon02").css("background-position","-25px -190px")
  }

  layui.use(['laypage', 'layer'], function() {
    var laypage = layui.laypage
            , layer = layui.layer;
    //回款计划
    laypage.render({
      url:"/userInfo",
      elem: 'demo3'
      ,limit:5
      ,curr: location.href.replace('#!fenye=','')
      ,hash: 'fenye'
      ,count: $page3 //数据总数
      ,page: {limit:5,page:1,limits:[10,20,30],layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']}
      ,jump:function(obj,first){   //当我点击跳转页面时会执行另一个ajax
        let params = new URLSearchParams();
        params.append("page",obj.curr);
        params.append("limit",obj.limit);
        params.append("uid",$uid)
        axios({
          method: 'post',
          url:'/investmentPage3',
          headers: { 'content-type': 'application/x-www-form-urlencoded'},
          data: params
        }).then(res=>{
          let data = res.data;
          //数据格式化
          data.forEach(function (d) {


            if(d.recovery_time !=null){
              d.recovery_time = d.recovery_time.substr(0,19).replace("T"," ");
              d.recovery_time = mytime(d.recovery_time);
            }else if(d.recovery_time==null){
              d.recovery_time="";
            }
            if(d.types==1){
              d.types = "活期";
            }else if(d.types==2){
              d.types = "定期";
            }

            if(d.state==1){
              d.state = "待收回";
            }else if(d.state==2){
              d.state = "已收回";
            };

          });
          vue3.plan=data;
        })

      }

    });
    //资金记录
    laypage.render({
      url:"/userInfo",
      elem: 'demo0'
      ,limit:5
      ,curr: location.href.replace('#!fenye=','')
      ,hash: 'fenye'
      ,count: $page //数据总数
      ,page: {limit:5,page:1,limits:[10,20,30],layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']}
      ,jump:function(obj,first){   //当我点击跳转页面时会执行另一个ajax
        let params = new URLSearchParams();
        params.append("page",obj.curr);
        params.append("limit",obj.limit);
        params.append("uid",$uid)
        axios({
          method: 'post',
          url:'/fundPage',
          headers: { 'content-type': 'application/x-www-form-urlencoded'},
          data: params
        }).then(res=> {
          let data = res.data;
          //数据格式化
          data.forEach(function (d) {
            d.fund_date = d.fund_date.substr(0,19).replace("T"," ");
            d.fund_date = mytime(d.fund_date);
            if(d.fund_post==$RECHARGE){
              d.fund_amunt = '+'+d.fund_amunt;
              d.fund_post = "充值";
            }else if(d.fund_post==$FUND_INVEST){
              d.fund_amunt = '-'+d.fund_amunt;
              d.fund_post = "投资";
            }else if(d.fund_post==$FUND_DEPOSIT){
              d.fund_amunt = '-'+d.fund_amunt;
              d.fund_post = "提现";
            }else if(d.fund_post==$FUND_REPAYMENT){
              d.fund_amunt = '-'+d.fund_amunt;
              d.fund_post = "还款";
            }else if(d.fund_post==$FUND_PAYMENT){
              d.fund_amunt = '+'+d.fund_amunt;
              d.fund_post = "回款";
            }else if(d.fund_post==$FUND_BORROW_MONEY){
              d.fund_amunt = '-'+d.fund_amunt;
              d.fund_post = "借款";
            };
          });
          vue1.funds = data;
        })

      }
    });

    //投资记录
    laypage.render({
      url:"/userInfo",
      elem: 'demo1'
      ,limit:5
      ,curr: location.href.replace('#!fenye=','')
      ,hash: 'fenye'
      ,count: $page2 //数据总数
      ,page: {limit:5,page:1,limits:[10,20,30],layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']}
      ,jump:function(obj,first){   //当我点击跳转页面时会执行另一个ajax
        let params = new URLSearchParams();
        params.append("page",obj.curr);
        params.append("limit",obj.limit);
        params.append("uid",$uid);
        axios({
          method: 'post',
          url:'/investmentPage3',
          headers: { 'content-type': 'application/x-www-form-urlencoded'},
          data: params
        }).then(res=>{
          let data = res.data;
          //数据格式化
          data.forEach(function (d) {
            d.Investment_time = d.Investment_time.substr(0,19).replace("T"," ");
            d.Investment_time = mytime(d.Investment_time);
            if(d.state==1){
              d.state = "待收回";
            }else if(d.state==2){
              d.state = "已收回";
            };

          });
          vue2.bids=data;
        })

      }

    });
    $("#integtal").click(function () {
//页面层-自定义
      layer.open({
        type: 2,
        title: false,
        closeBtn: 0,
        shadeClose: true,
        area: ['630px', '550px'],
        // height:400,
        skin: 'yourclass',
        content: '/integral/tointegralList'
      });
    })
  })

  function mytime(oldTimes1) {
    let time1 = oldTimes1.split(' ')[0];
    // console.log("1、第二种方式time1:" + time1)
    let arrTime = oldTimes1.split(' ')[1].split(':');
    // console.log("2、第二种方式arrTime:" + arrTime)
    let time2 = arrTime.slice(1, arrTime.length).join(':');
    // console.log("3、第二种方式time2:" + time2)
    let h = parseInt(arrTime[0]) + 8;
    // console.log('4、第二种方式小时：', h);
    let newH = ((h < 24) ? h : (h % 24)).toString();
    if(newH<10){
      newH=" 0"+newH;
    }
    return time1 + ' ' + newH + ':' + time2;
  }
</script>
<script>
  /*获取一个月的天数 */
  function getCountDays() {
    var curDate = new Date();
    /* 获取当前月份 */
    var curMonth = curDate.getMonth();
    /*  生成实际的月份: 由于curMonth会比实际月份小1, 故需加1 */
    curDate.setMonth(curMonth + 1);
    /* 将日期设置为0, 这里为什么要这样设置, 我不知道原因, 这是从网上学来的 */
    curDate.setDate(0);
    /* 返回当月的天数 */
    return curDate.getDate();
  }
  layui.use([ 'element', 'table', 'layer', 'form' ,'laydate','upload','layedit'],function() {
    var element = layui.element;
    var layer = layui.layer;
    var table = layui.table;
    var form = layui.form;
    var laydate = layui.laydate;
    var upload = layui.upload;
    var layedit =layui.layedit;

    $("#exchange").click(function () {
        window.location.href="/shopping_mall"
    });
    //签到
    $("#sign_in").click(function () {
      var index = layer.load(1, {
        shade: [0.1,'#fff'] //0.1透明度的白色背景
      });
      var day = new Date().getDate();
      $.post("/sign_in",{day:day,type:1},function (data) {
        if(data.whether == "no"){
          layer.msg("签到成功,恭喜您获得10积分",{icon:1});
        }else if(data.whether == "yes"){
          layer.msg("今日你已签到,明天再来吧~",{icon:6});
        }else if(data.whether == 'error'){
          layer.msg("签到异常,刷新再重试",{icon:2});
        }
        layer.close(index);
        qiandaoList();
      },'json');
    });
    //展示签到
    $("#sel_sign").click(function () {
      var index = layer.load(1, {
        shade: [0.1,'#fff'] //0.1透明度的白色背景
      });
      qiandaoList(index);
      layer.open({
        type: '1',
        area: ["850px","350px"],
        title: '签到',
        closeBtn: 1, //不显示关闭按钮
        fixed: false, //不固定
        shadeClose: true, //开启遮罩关闭
        content: $('#addAdvert'),
        cancel: function(index, layero){
          layer.close(index);
          $("#addAdvert").css("display","none");
          return false;
        }
      });
    });

    $("#dataTable").on('click',"[name = repair]",function () {
       let day =  $(this).find(".repair_val").val();
      layer.confirm('确认花费10积分补签吗？', {
        btn: ['是','否'] //按钮
      }, function(index){
        let params = new URLSearchParams();
        params.append("day",day);
        axios({
          method: 'post',
          url:'/buqian',
          headers: { 'content-type': 'application/x-www-form-urlencoded'},
          data: params
        }).then(res=>{
            if(res.data.whether == 'yes'){
                layer.msg("补签成功",{icon:1});
            }else if(res.data.whether == 'error'){
              layer.msg("异常",{icon:3});
            }else if(res.data.whether == 'InsufficientPoints'){
              layer.msg("积分不足",{icon:2});
            }
            layer.close(indexs);
        })
          qiandaoList();
          layer.close(index);
      }, function(){
      });
    })
  });
  function qiandaoList(index) {
      $("#dataTable").empty();
      let day = new Date().getDate();
      $.post("/sign_in",{day:day,type:2},function (data) {
        var days = getCountDays();
        let day = new Date;
        let strDate = day.getDate();
        for (let i = 1; i <= days; i++) {
          for(let a=0;a<data.yesSign.length;a++){
            if(data.yesSign[a]==i) {
              $("#dataTable").append("<div style=\"margin-left: 18px;float: left\" class=\"layui-col-md1\">\n" +
                      "                <div class=\"grid-demo grid-demo-bg2\"><button style=\"width: 40px;padding: 0px;background-color: #0ac893;\" type=\"button\" class=\"layui-btn layui-btn-warm layui-btn-radius\">" + i + "</button></div>\n" +
                      "            </div>")
            }else if(data.yesSign[a] == strDate){
              $("#wei").css("display","none");
            }
          }
          if(strDate == i){
            $("#dataTable").append("<div style=\"margin-left: 18px;float: left\" id='wei' class=\"layui-col-md1\">\n" +
                    "                <div class=\"grid-demo grid-demo-bg2\"><button style=\"width: 40px;padding: 0px;background-color: #c82938;\" type=\"button\" class=\"layui-btn layui-btn-warm layui-btn-radius\">" + i + "</button></div>\n" +
                    "            </div>")
          }
          for(let b=0;b<data.noSign.length;b++){
            if(data.noSign[b] == strDate){
                break
            }
            if(data.noSign[b] == i) {
              $("#dataTable").append("<div style=\"margin-left: 18px;float: left\" class=\"layui-col-md1\">\n" +
                      "                <div class=\"grid-demo grid-demo-bg2\"><button name='repair' style=\"width: 40px;padding: 0px;background-color: #5b5d5dd9;\" type=\"button\" class=\"layui-btn layui-btn-warm layui-btn-radius\">补<input hidden value='"+i+"' class='repair_val' /></button></div>\n" +
                      "            </div>")
            }
          }
        }

        var same_day = new Date().getDate()+1;
        for (; same_day<=days; same_day++) {
          $("#dataTable").append("<div style=\"margin-left: 18px;float: left\" class=\"layui-col-md1\">\n" +
                  "                <div class=\"grid-demo grid-demo-bg2\"><button style=\"width: 40px;padding: 0px;\" type=\"button\" class=\"layui-btn layui-btn-warm layui-btn-radius\">" + same_day + "</button></div>\n" +
                  "            </div>");

        }
        if(data.whether == '7'){
          layer.msg('[[${T(com.ddf.publics.tool.Constant).CONTINUOUS_SIGN_IN_REWARD}]],恭喜你获得'+[[${T(com.ddf.publics.tool.Constant).INVAESTMENT_SEVEN}]]+'积分',{icon:6});
        }else if(data.whether == '15'){
          layer.msg('[[${T(com.ddf.publics.tool.Constant).CONTINUOUS_SIGN_IN_REWARD}]],恭喜你获得'+[[${T(com.ddf.publics.tool.Constant).INVAESTMENT_FIFTEEN}]]+'积分',{icon:6});
        }else if(data.whether == '25'){
          layer.msg('[[${T(com.ddf.publics.tool.Constant).CONTINUOUS_SIGN_IN_REWARD}]],恭喜你获得'+[[${T(com.ddf.publics.tool.Constant).INVAESTMENT_TWENTYFIVE}]]+'积分',{icon:6});
        }else if(data.whether == 'max'){
          layer.msg('[[${T(com.ddf.publics.tool.Constant).CONTINUOUS_SIGN_IN_REWARD}]],恭喜你获得'+[[${T(com.ddf.publics.tool.Constant).INVAESTMENT_MAX}]]+'积分',{icon:6});
        }
        layer.close(index);
    },'json');
  }
</script>

<script>
    let $name = $("#name").val();//真实姓名
    let $idCard =$("#idCard").val();//身份证号
    let $pwd =$("#pwd").val();//交易密码
    let $email =$("#email").val();//邮箱
    var i = 0;

    if($name !='' ){
      i+=1;
    }
    if($pwd != ''){
      i+=1;
    }
    if($email != ''){
      i+=1;
    }
    if($idCard !='' ){
      i+=1;
    }
    if(i==0){
      $("#aqdj").addClass("aq1");
      $("#aq").text("低");
    }
    if(i==1){
      $("#aqdj").removeClass("safe-level");
      $("#aqdj").addClass("aq2");
      $("#aq").text("中");
    }
    if(i==2){
      $("#aqdj").removeClass("safe-level");
      $("#aqdj").addClass("aq2");
      $("#aq").text("中");
    }
    if(i==3){
      $("#aqdj").removeClass("safe-level");
      $("#aqdj").addClass("aq2");
      $("#aq").text("中");
    }
    if(i==4){
      $("#aqdj").removeClass("safe-level");
      $("#aqdj").addClass("aq3");
      $("#aq").text("高");
    }
</script>
</html>
